package application.model 
{
	import application.ApplicationFacade;
	import application.model.VO.GroupVO;
	import org.puremvc.as3.interfaces.IProxy;
	import org.puremvc.as3.patterns.proxy.Proxy;
	/**
	 * 图片组的数据模型
	 * @author Ning
	 */
	public class GroupProxy extends Proxy implements IProxy
	{
		public static const NAME:String = 'GroupProxy'; 
		
		private var _dataProxy:DataProxy;
		private var _layoutProxy:LayoutProxy;
		
		public function GroupProxy() 
		{
			super(NAME,new GroupVO);
			init();
		}
		private function init():void
		{
			_dataProxy = facade.retrieveProxy(DataProxy.NAME) as DataProxy;
			_layoutProxy=facade.retrieveProxy(LayoutProxy.NAME) as LayoutProxy;
		}
		public function setConfig():void
		{
			groupVO.names = _dataProxy.groupNames;
			groupVO.layout = _layoutProxy.getLayout(AppGlobal.GROUP_COMBOBOX_LAYOUT_KEY);
			
			sendNotification(ApplicationFacade.UPDATE_GROUP_CONFIG, groupVO);
		}
		private function get groupVO():GroupVO {
			return data as GroupVO;
		}
	}
}